<template>
  <svg :style="{ width, height }" aria-hidden="true">
    <use :xlink:href="prefix + iconName" :fill="color" />
  </svg>
</template>

<script setup lang="ts">
defineProps({
  prefix: {
    type: String,
    default: '#icon-'
  },
  iconName: {
    type: String,
    required: true
  },
  color: {
    type: String,
    default: '#409eff'
  },
  width: {
    type: String,
    default: '16px'
  },
  height: {
    type: String,
    default: '16px'
  }
})
</script>

<style scoped>
.svg-icon {
  width: 1em;
  height: 1em;
  position: relative;
  fill: currentColor;
  vertical-align: -2px;
}
</style>
